package com.atguigu.gulimail.cart.service;


import com.atguigu.gulimail.cart.vo.Cart;
import com.atguigu.gulimail.cart.vo.CartItem;
import com.atguigu.gulimail.cart.vo.UserInfoTo;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {
    /*
        将数据添加到购物车中
     */
    CartItem addSku(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    /*
        获取添加成功的购物项，显示到success页面
     */
    CartItem getCartItem(Long skuId);

    Cart getCartList(UserInfoTo userInfoTo);

    void clearCart(String key);

    void setItemCheck(Long skuId, boolean b);

    void countItem(Long skuId, Integer num);

    void deleteItem(Long skuId);

    List<CartItem> getUerCartItems();
}
